home *** CD-ROM | disk | FTP | other *** search
-
- /*
-
- File Controller
- April 2
-
- The File Controller is the central object. Its function is to manage the
- loading and memory storage of all sounds, soundviews, and soundview
- windows. All File menu items go directly to it. The round-robin quitting
- and save all systems are managed by it. Finally, EVERYTHING MUST go
- through the File Controller to get information on any sound.
-
- The File Controller uses the Sound Table, which no one else is allowed
- to touch, on pain of death. The Sound Table stores sound, soundview, and
- window IDs, and X/Y coordinates for new windows.
-
- */
-
- #import <objc/Object.h>
-
- @interface FileController:Object
- {
- id TheSoundTable;
- id TheInfoManager;
- id TheEditController;
- id TheModuleController;
- id TheSoundManager;
- id ThePreferencesManager;
-
- id Console;
- id ClosePanel;
- id QuitPanel;
- id CurrentPanel;
- id NoDataSavePanel;
- id SaveButton;
- id SaveAsButton;
- id SaveAllButton;
- id RevertButton;
- id CloseButton;
-
-
- BOOL Quitting; // Program is quitting
- BOOL PanelCancelled; // A panel has cancelled
- BOOL DoClose; // User wants program to close window
- BOOL DoQuit; // User wants program to quit
- }
-
- - init;
- - New:sender; // creates a new sound.
- /* This entails a lot. The program
- creates and manages a new sound,
- soundview, window, and sets
- delegates of the soundview,
- window, and sound to itself, the
- editcontroller and the
- soundcontroller.*/
-
- - NewRecordedSound: ThisSound;
- - Open:sender; // opens sounds. Similar to New.
- - Close:sender; // closes sounds. Goes through save
- // process.
-
- - SaveAll:sender; // initiates save all process.
- - SaveAs:sender; // etc.
- - Save:sender;
- - Revert:sender;
-
- /* Empty Sounds cannot be saved */
-
- - Quit:sender;
- - Print:sender;
- - DoPageLayout:sender;
-
- - SoundChanged:ThisSound; // sets sound edited flags in
- // sound table, and sets the window
- // close box to a broken X.
-
-
-
-
-
- // The following are very useful.
- // They return ids to the current
- // window, sound, or soundview.
-
-
- - CurrentWindow:sender; /*returns NULL if no Current*/
- - CurrentSound:sender; // ditto
- - CurrentSoundView:sender; // ditto
-
-
-
- /* The following methods are used internally.
- On pain of death, Do not call them. */
-
- - (BOOL) Save;
- - (BOOL) SaveAs;
- - SaveBeforeQuit:sender;
- - DontSaveBeforeQuit:sender;
- - CancelSaveBeforeQuit:sender;
-
- - SaveBeforeClose:sender;
- - DontSaveBeforeClose:sender;
- - CancelSaveBeforeClose:sender;
-
- - TurnOnMenu:sender;
- - TurnOffMenu:sender;
- - TurnOffInformation:sender;
- - TurnOnInformation:sender;
- - CheckInformation:sender;
-
- - NoDataSaveOkay:sender;
-
- /* The following method is implemented by FileController
- as a delegate of SavePanel and OpenPanel. Do not call it. */
-
- - (BOOL) panelValidateFilenames:sender;
-
-
-
- /* The following methods are implemented by FileController
- as a window delegate. Do not call them. */
-
- - windowDidResize:sender;
- - windowDidBecomeKey:sender;
- - windowDidBecomeMain:sender;
- - windowWillClose:sender;
- - WindowDidUpdate:sender;
- - WindowDidResize:sender;
-
- /* The following methods are implemented by FileController
- as a delegate of Application. Do not call them. */
-
- - appDidBecomeActive:sender;
- - appDidUnhide:sender;
- - appDidUpdate:sender;
-
- @end
-